EX

Syntax: EX file *[,{filex | #chx}]* [;cmd$]
Location: Toolkit II, THOR XVI

This command forces the given file (which must be an executable program) to be executed and control is then generally returned to the calling program to enable the new job to multitask alongside the calling program. Similar parameters as for EW can be passed to the job.

Use EW if the program cannot multitask for some reason or if you do not want it to.

Using EX to set up filters
--------------------------
It is actually quite simple to create a multitasking environment on the QL using the EX command to set up several programs all of which will process a given file (or data entered into a given channel) in turn. The syntax for this version of the command is:

EX jobparams1 *[TO jobparamsi]* [TO #chan0]

where jobparams represents the same parameters as are available for the normal EX command, being:

file *[,{filex | #chx}]* [;cmd$]

What this actually does, is to set up a chain of jobs or channels whereby one extra channel is opened for each job to form the output channel for the job on the left of the TO and another channel is opened to form the input channel of the job on the right of the TO.  Where a channel number appears at the end of the line (after a TO), this is taken as being the final output channel and nothing further can be done to the original input.

CROSS-REFERENCE:
Use FTYP or FILE_TYP to check if a file is executable.
FDAT returns the dataspace of an executable file, FXTRA provides other information. ET is very similar to EX.
